import React from 'react';
import { DATA_ENTRY, FormGroup, AdvancedSearch, ModalC, codeType, FirstHeaderC, SecondHeaderC } from '../../comps';
import { PrimaryC, PrimaryGhostC } from '../../comps';
import { Tooltip } from 'antd';
import moment from 'moment';

class FormGroupDemo extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      fileList: [],
      selInit1: undefined,
      loading: true,
      selInit2: undefined,
      span: '',
      comDate: undefined,
      hasDataBD: undefined,
      hasDataED: undefined,
      disabled: false,
      dataRange: undefined,
      info: {},
      formItemLayout: {
        labelCol: {
          xs: { span: 0, offset: 0 },
          sm: { span: 6, offset: 0 },
          md: { span: 6, offset: 0 },
          lg: { span: 6, offset: 0 },
          xl: { span: 6, offset: 0 },
          xxl: { span: 6, offset: 0 },
        },
        wrapperCol: {
          xs: { span: 22, offset: 0 },
          sm: { span: 16, offset: 0 },
          md: { span: 16, offset: 0 },
          lg: { span: 16, offset: 0 },
          xl: { span: 16, offset: 0 },
          xxl: { span: 16, offset: 0 },
        },
      },

      formItemLayout3: {
        labelCol: {
          xs: { span: 0, offset: 0 },
          sm: { span: 2, offset: 0 },
          md: { span: 2, offset: 0 },
          lg: { span: 2, offset: 0 },
          xl: { span: 2, offset: 0 },
          xxl: { span: 2, offset: 0 },
        },
        wrapperCol: {
          xs: { span: 18, offset: 0 },
          sm: { span: 20, offset: 0 },
          md: { span: 20, offset: 0 },
          lg: { span: 20, offset: 0 },
          xl: { span: 20, offset: 0 },
          xxl: { span: 20, offset: 0 },
        },
      },

      formItemLayout2: {
        labelCol: {
          xs: { span: 0, offset: 0 },
          sm: { span: 3, offset: 0 },
          md: { span: 3, offset: 0 },
          lg: { span: 3, offset: 0 },
          xl: { span: 3, offset: 0 },
          xxl: { span: 3, offset: 0 },
        },
        wrapperCol: {
          xs: { span: 18, offset: 0 },
          sm: { span: 19, offset: 0 },
          md: { span: 19, offset: 0 },
          lg: { span: 19, offset: 0 },
          xl: { span: 19, offset: 0 },
          xxl: { span: 19, offset: 0 },
        },
      },

      formItemLayout1: {
        labelCol: {
          xs: { span: 0, offset: 0 },
          sm: { span: 5, offset: 0 },
          md: { span: 5, offset: 0 },
          lg: { span: 5, offset: 0 },
          xl: { span: 5, offset: 0 },
          xxl: { span: 5, offset: 0 },
        },
        wrapperCol: {
          xs: { span: 15, offset: 0 },
          sm: { span: 15, offset: 0 },
          md: { span: 15, offset: 0 },
          lg: { span: 15, offset: 0 },
          xl: { span: 15, offset: 0 },
          xxl: { span: 15, offset: 0 },
        },
      },
    };

    setTimeout(() => {
      this.setState({
        selInit1: [
          { value: '1', title: '下拉选择1' },
          { value: '2', title: '下拉选择2' },
          { value: '3', title: '下拉选择3' },
        ],
        loading: false,
        selInit2: [
          { value: '1', title: '下拉选择1', children: [{ value: '11', title: 'dddd' }] },
          { value: '2', title: '下拉选择2' },
          { value: '3', title: '下拉选择3' },
        ],
        comDate: { type: '0', beginDate: moment('2020-01-01'), endDate: moment('2020-09-01') },
        hasDataBD: moment('2018-05-05'),
        hasDataED: moment('2020-01-23'),
        dataRange: [moment('2020-01-01'), moment('2020-09-01')],
      });
    }, 3000);
  }

  componentDidMount() {
    setTimeout(() => {
      this.setState({
        fileList: [
          { title: '上传测试.docx', value: '1633883759788_000_000_CB30786BC5ADEA4D12ED29E3188280AB8DE357B5336A723A9235C4DEA7FD26ED' },
          { title: '批量导入模板.xls', value: '1634181931247_000_000_36D26EB7F0F8C72C5D9161F462D73A99B43D3504236D7109357A2B50490E7316' },
        ],
      });
    }, 6000);
  }

  componentWillUnmount() {
    // 删除窗口大小的监听
    window.removeEventListener('resize', this.windowChange);
  }

  // 窗口大小变更触发
  windowChange = () => {
    const screenWidth = document.documentElement.clientWidth;
    console.log('width', screenWidth);
    if (screenWidth < 1920) {
      if (this.state.fieldInRow !== 3) {
        this.setState({
          span: '16',
        });
      }
    } else {
      if (this.state.fieldInRow !== 4) {
        this.setState({
          span: '12',
        });
      }
    }
  };

  onQuery = (e) => {
    console.log(e);
    this.setState({});
    this.INPUTNUMBER.setNumber(5);
  };

  setref = (ref) => {
    this.setState({ RANGEDATE: ref }, () => {
      console.log('lal', this.state.RANGEDATE);
      return this.state.RANGEDATE;
    });
    return ref;
  };

  getLayerValue = (value) => {
    console.log(value, '获取业务目标弹窗中的值');
  };
  onChange = (value) => {
    console.log(value, '获取业务目标更改的值');
  };
  render() {
    return (
      <div style={{ padding: '20px' }}>
        <FirstHeaderC title='根据分辨率自动布局' topHeight={true} />
        {/* <SecondHeaderC  title='1600展示9个字，1800展示10个字，1920展示8个字，分辨率越大，展示的字数越多' />  */}
        <SecondHeaderC title='一排展示4个时8个字后换行，一排展示3个时7个字后换行' />
        <FormGroup
          dataSource={[
            { dataIndex: 'id1', title: '一二三四五六七八', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id2', title: '一二三四五六七八九', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id3', title: '一二三四五六七八九十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id4', title: '一二三四五六七八九十十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id5', title: '一二三四五六七八九十十一', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id6', title: '一二三四五六七八九十十一十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id7', title: '一二三四五六七八九十十一十二', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id8', title: '一二三四五六七八九十十一十二十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id9', title: '一二三四五六七八九十十一十二十三', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id10', title: '一二三四五六七八九十十一十二十三十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id11', title: '一二三四五六七八九十十一十二十三十四', type: DATA_ENTRY.INPUT, lineOne: true, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id11', helper: '111', title: '一二三四五六七', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id22', helper: '111', title: '一二三四五六七八', type: DATA_ENTRY.INPUT },
            { dataIndex: 'id22', helper: '111', title: '一二三四五六七八', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id33', helper: '111', title: '一二三四五六七八九', type: DATA_ENTRY.INPUT },
            { dataIndex: 'id44', helper: '111', title: '一二三四五六七八九十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id55', helper: '111', title: '一二三四五六七八九十十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id66', helper: '111', title: '一二三四五六七八九十十一', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id77', helper: '111', title: '一二三四五六七八九十十一十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id88', helper: '111', title: '一二三四五六七八九十十一十二', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id99', helper: '111', title: '一二三四五六七八九十十一十二十', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            { dataIndex: 'id100', helper: '111', title: '一二三四五六七八九十十一十二十三', type: DATA_ENTRY.INPUT, rules: [{ required: true, message: '请输入' }] },
            {
              dataIndex: 'id11',
              helper: '111',
              title: '一二三四五六七八九十十一十二十三十',
              type: DATA_ENTRY.INPUT,
              lineOne: true,
              rules: [{ required: true, message: '请输入' }],
            },
          ]}
        />
        <SecondHeaderC title='获取所有form的data' style={{ marginTop: '10px' }} />
        <FormGroup
          dataSource={[
            {
              dataIndex: 'rateIndustry',
              title: '资金运用行业',
              type: DATA_ENTRY.FUNDAPPLICATIONINDUSTRYC,
              rules: [{ required: true, message: '请输入' }],
            },
            {
              dataIndex: 'rateIndustrys',
              title: '资金运用行业',
              type: DATA_ENTRY.FUNDAPPLICATIONINDUSTRYC,
              initialValue: 'B06',
              rules: [{ required: true, message: '请输入' }],
            },
            {
              dataIndex: 'SPPI_result',
              title: 'SPPI结果',
              type: DATA_ENTRY.SPPIRESULTC,
              selectProps: {
                SecuritiesCode: undefined,
                rightContentShow: true, //右侧按钮是否展示，后面展示后的禁用逻辑，展示逻辑，组件控制
                SPPI_result: null, //根据证券代码切换获取SPPI结果
                SppItype: 3,
                sppITitle: '新增测试',
              },
            },
            {
              dataIndex: 'SPPI_result1',
              title: 'SPPI结果',
              type: DATA_ENTRY.SPPIRESULTC,
              selectProps: {
                SecuritiesCode: {
                  exchangeCode: '101',
                  tradingCode: '111032',
                },
                rightContentShow: true, //右侧按钮是否展示，后面展示后的禁用逻辑，展示逻辑，组件控制
                SPPI_result: null, //根据证券代码切换获取SPPI结果
                SppItype: 3,
                sppITitle: '新增测试',
              },
              initialValue: '1',
              rules: [{ required: true, message: '请输入' }],
            },
            {
              dataIndex: 'id24',
              title: '目标内容',
              type: DATA_ENTRY.BUSINESSTARGETC,
              onRef: (ref) => (this.refs = ref),
              rightContentShow: true,
              dataIndex: 'target',
              disabled: false,
              info: this.state.info,
              TaretType: 2,
              onChangeFn: this.onChange,
              getLayerValue: this.getLayerValue,
              rules: [{ required: true, message: '请输入' }],
            },
            {
              dataIndex: 'ad1',
              title: '组合组合',
              type: DATA_ENTRY.PRODUCTGROUPTREE,
              disabled: this.state.disabled,
            },
            {
              dataIndex: 'ad2',
              title: '产品产品产',
              type: DATA_ENTRY.PRODUCTLIST,
              disabled: this.state.disabled,
            },
            {
              dataIndex: 'ad3',
              helper: '1111',
              type: DATA_ENTRY.PRODUCTGROUPTREE,
              disabled: this.state.disabled,
              multiple: false,
            },
            {
              dataIndex: 'ad4',
              type: DATA_ENTRY.PRODUCTLIST,
              disabled: this.state.disabled,
            },
            {
              dataIndex: 'ad5',
              type: DATA_ENTRY.PRODUCTLIST,
              disabled: this.state.disabled,
            },
            {
              dataIndex: 'ad6',
              codeType: codeType.etf,
              type: DATA_ENTRY.SECURITIESCODE,
              disabled: this.state.disabled,
            },
            {
              dataIndex: 'input1',
              title: '输入框输入框输入框输入框输入框',
              type: DATA_ENTRY.INPUT,
              disabled: this.state.disabled,
              suffix: '股咕咕咕咕咕咕',
              initialValue: '123',
              // disabled: true
            },
            {
              form: this.props.form,
              dataIndex: 'input132423',
              title: 'Win债券类型',
              type: DATA_ENTRY.WINBONDTYPE,
              initialValue: ['a101020400'],
            },

            {
              dataIndex: 'input2',
              title: '数字输入',
              type: DATA_ENTRY.INPUTNUMBER,
              disabled: this.state.disabled,
              unit: '元',
              splitStyle: true,
              initialValue: 123,
              rules: [{ required: true, message: '请输入数字!' }],
              onRef: (ref) => (this.INPUTNUMBER = ref),
            },
            {
              dataIndex: 'input3',
              title: '数字输入数字输入数字输入数字输入',
              type: DATA_ENTRY.INPUTNUMBER,
              unit: '万元',
              disabled: true,
            },

            {
              dataIndex: 'select1',
              title: '下拉选择下拉选择下拉选择下择下',
              type: DATA_ENTRY.SELECT,
              dataSource: this.state.selInit1,
              loading: this.state.loading,
              // isMultiple: true,
              allowClear: true,
              onChange: (e) => console.log(e),
              disabled: this.state.disabled,
            },
            {
              dataIndex: 'select2',
              title: '树形下拉',
              type: DATA_ENTRY.TREESELECT,
              dataSource: this.state.selInit2,
              loading: this.state.loading,
              isMultiple: true,
              allowClear: true,
              onChange: (e) => console.log(e),
              disabled: this.state.disabled,
            },
            {
              selectIndex: 'complextdate1',
              startIndex: 'begin1',
              endIndex: 'end1',
              title: '日期区间期区间期区间间期区间',
              type: DATA_ENTRY.COMPLEXDATE,
              initialValue: this.state.comDate,
              hasDataBD: this.state.hasDataBD,
              hasDataED: this.state.hasDataED,
              selOnChange: this.selOnChange,
              startOnChange: (e) => console.log(e),
              endOnChange: (e) => console.log(e),
              onRef: (ref) => (this.COMPLEXDATE = ref),
              self: this.COMPLEXDATE,
              disabled: this.state.disabled,
            },
            {
              dataIndex: 'date1',
              title: '时间选择时间选择时间选择',
              type: DATA_ENTRY.SINGLEDATE,
              disableBegin: moment('2020-10-10'),
              disableEnd: moment('2020-11-05'),
              initialValue: moment('2020-11-01'),
              onChange: (e) => console.log(e),
            },
            {
              dataIndex: ['endDate', 'beginDate'],
              title: '日期区间期区间期区间间期区间',
              type: DATA_ENTRY.RANGEDATE,
              initialValue: [moment().subtract(1, 'year'), moment().subtract(5, 'day')],
              hasDataED: moment().subtract(1, 'day'),
              onRef: (ref) => {
                this.RANGEDATE = ref;
              },
              self: this.RANGEDATE,
            },
            {
              dataIndex: ['beginDate1', 'endDate1'],
              title: '日期区间期区间期区间间期区间',
              type: DATA_ENTRY.RANGEDATE,
              initialValue: [moment().add(0, 'day'), moment().add(1, 'year').subtract(1, 'day')],
              hasDataBD: moment().add(0, 'day'),
              disableFuture: false,
              onRef: (ref) => {
                this.RANGEDATE = ref;
              },
              self: this.RANGEDATE,
            },
          ]}
          onRef={(ref) => {
            this.wjj = ref;
          }}
        />
        <PrimaryC title='获取所有form的data' onClick={() => console.log(this.wjj.getFormGroupData())} />
        <br />
        <br />
        <br />

        <FirstHeaderC title='用户自定义布局,一排3个' topHeight={true} />
        <FormGroup
          dataSource={[
            { dataIndex: 'id1424', title: '一二三四五六七八九十十', type: DATA_ENTRY.INPUT }, // 自定义layout布局
            { dataIndex: 'id2324234', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT },
            { dataIndex: 'id1', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT },
            { dataIndex: 'id2', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT },
            { dataIndex: 'id22', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT },
            { dataIndex: 'id22344', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT },
            { dataIndex: 'id22344', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT },
          ]}
          autoLayout={false}
          rowNumber={3}
        />

        <FirstHeaderC title='用户自定义背景样式' topHeight={true} />
        <FormGroup
          dataSource={[
            { dataIndex: 'id1424', title: 'formInfo', type: DATA_ENTRY.INPUT, span: '12' },
            { dataIndex: 'id2324234', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT, span: '12' },
            { dataIndex: 'id1', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT, span: '12' },
            { dataIndex: 'id2', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT, span: '12' },
            { dataIndex: 'id22', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT, span: '12' },
            { dataIndex: 'id22344', title: 'xxxxxxxx', type: DATA_ENTRY.INPUT, showTextArea: true, autosize: { minRows: 4, maxRows: 4 }, span: '24' },
          ]}
          autoLayout={false}
          style={{ backgroundColor: '#FAFBFC', paddingTop: '15px', paddingBottom: '12px' }}
        />

        <FirstHeaderC title='支持formInfo 响应式' topHeight={true} />
        <FormGroup
          dataSource={[
            { dataIndex: '1', title: 'formInfo', info: 'formInfo的内容1', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '2', title: 'formInfo', info: 'formInfo的内容2', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '3', title: 'formInfo', info: 'formInfo的内容3', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '4', title: 'formInfo', info: 'formInfo的内容4', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '5', title: 'formInfo', info: 'formInfo的内容5', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '6', title: 'formInfo', info: 'formInfo的内容6', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '7', title: 'formInfo', info: 'formInfo的内容7', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '8', title: 'formInfo', info: 'formInfo的内容8', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '9', title: 'formInfo', info: 'formInfo的内容9', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '10', title: 'formInfo', info: 'formInfo的内容10', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '11', title: 'formInfo', info: 'formInfo的内容11', type: DATA_ENTRY.FORMINFO },
            { dataIndex: '12', title: 'formInfo', info: 'formInfo的内容12', type: DATA_ENTRY.FORMINFO },
          ]}
        />

        <FirstHeaderC title='支持formInfo 自定义' topHeight={true} />
        <FormGroup
          dataSource={[
            { dataIndex: '1', title: 'formInfo', info: 'formInfo的内容1', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '2', title: 'formInfo', info: 'formInfo的内容2', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '3', title: 'formInfo', info: 'formInfo的内容3', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '4', title: 'formInfo', info: 'formInfo的内容4', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '5', title: 'formInfo', info: 'formInfo的内容5', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '6', title: 'formInfo', info: 'formInfo的内容6', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '7', title: 'formInfo', info: 'formInfo的内容7', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '8', title: 'formInfo', info: 'formInfo的内容8', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '9', title: 'formInfo', info: 'formInfo的内容9', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '10', title: 'formInfo', info: 'formInfo的内容10', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '11', title: 'formInfo', info: 'formInfo的内容11', type: DATA_ENTRY.FORMINFO, span: '12' },
            { dataIndex: '12', title: 'formInfo', info: 'formInfo的内容12', type: DATA_ENTRY.FORMINFO, span: '12' },
          ]}
          autoLayout={false}
          style={{ backgroundColor: '#FAFBFC', paddingTop: '15px', paddingBottom: '12px' }}
        />

        <FirstHeaderC title='支持formInfo 自定义' topHeight={true} />
        <FormGroup
          //     <UploadC
          //     type={1}
          //     showUploadList={true}
          //     onUpload={(e) => { console.log(e, '111') }}
          //     onRef={e => this.setState({ ref: e })}
          // />
          dataSource={[
            {
              dataIndex: '1',
              title: '评级资料',
              upLoadTitle: '上传附件',
              upLoadType: 1,
              //  action:'api/v1/attach/upload2Ce',
              showUploadList: true,
              //  data:{
              //     userCode: '014205',
              //     busiId: 'fda1f9619a064a579ca23f2e73aa523e',
              //     busiType: 'BUSI_TYPE_TYLC',
              //  },
              onUpload: (e) => {
                console.log(e, '111');
              },
              //  onRef:e => this.setState({ ref: e }),
              type: DATA_ENTRY.FORMUPLOAD,

              span: '24',
            },
          ]}
          autoLayout={false}
          style={{ backgroundColor: '#FAFBFC', paddingTop: '15px', paddingBottom: '12px' }}
        />

        <FormGroup
          dataSource={[
            {
              dataIndex: '1',
              title: '评级资料',
              upLoadTitle: '上传附件',
              upLoadType: 1,
              action: 'api/v1/attach/upload2Ce',
              showUploadList: true,
              value: this.state.fileList,
              fileListLoading: !this.state.fileList?.length > 0,
              onUpload: (e) => {
                console.log(e, '111');
              },
              //  onRef:e => this.setState({ ref: e }),
              type: DATA_ENTRY.FORMUPLOAD,
              span: '24',
              styleRow: { width: '40%' },
            },
            {
              dataIndex: '1',
              title: '评级资料',
              upLoadTitle: '上传附件',
              upLoadType: 1,
              //  action:'api/v1/attach/upload2Ce',
              showUploadList: true,
              value: this.state.fileList,
              fileListLoading: !this.state.fileList?.length > 0,
              onUpload: (e) => {
                console.log(e, '111');
              },
              //  onRef:e => this.setState({ ref: e }),
              type: DATA_ENTRY.FORMUPLOAD,
              span: '12',
            },
            {
              dataIndex: 'formInfo_2',
              title: 'formInfo',
              info: 'formInfo的内容1',
              type: DATA_ENTRY.FORMINFO,
              span: '24',
              styleRow: { width: '40%', color: 'red' },
            },
            {
              dataIndex: 'inputs',
              title: 'xxxxxxxx',
              type: DATA_ENTRY.INPUT,
              span: '24',
              styleRow: { width: '30%' },
              placeholder: '自定义设置宽度为30%',
            },
            {
              dataIndex: ['rateRangeStart', 'rateRangeEnd'],
              title: '评级区间',
              // formItemLayout: FormItemLayout,
              type: DATA_ENTRY.RANGESELECT,
              // initialValue: ['1', '3'],
              dataSource: [[], []],
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'search_LIKE_exchange',
              title: '交易市场',
              type: DATA_ENTRY.TRADINGMARKET,
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'bench8',
              type: DATA_ENTRY.BENCHMARK,
              title: 'BENCHMARK',
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'inputNumber',
              title: '默认数字输入',
              type: DATA_ENTRY.INPUTNUMBER,
              span: '24',
              placeholder: '自定义设置宽度为30',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'inputNumberUnit',
              title: '数字输入',
              type: DATA_ENTRY.INPUTNUMBER,
              unit: '万元',
              disabled: false,
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'ad11',
              title: '组合组合',
              type: DATA_ENTRY.PRODUCTGROUPTREE,
              disabled: this.state.disabled,
              span: '8',
            },
            {
              dataIndex: ['product1', 'group1'],
              type: DATA_ENTRY.PRODUCTGROUPSEP,
              title: ['产品1', '组合2'],
              span: '24',
              spanCol: '8',
            },
            {
              dataIndex: 'ad22',
              title: '产品产品产',
              type: DATA_ENTRY.PRODUCTLIST,
              disabled: this.state.disabled,
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'ad66',
              title: '证券代码多选_1',
              codeType: codeType.etf,
              type: DATA_ENTRY.SECURITIESCODE,
              disabled: this.state.disabled,
              span: '24',
              multiple: true,
              styleRow: { width: '30%' },
            },
            {
              form: this.props.form,
              dataIndex: 'input132423',
              title: 'Win债券类型_1',
              type: DATA_ENTRY.WINBONDTYPE,
              initialValue: ['a101020400'],
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'select1',
              title: '下拉选择阿斯顿发送到发送到发',
              type: DATA_ENTRY.SELECT,
              dataSource: this.state.selInit1,
              loading: this.state.loading,
              allowClear: true,
              onChange: (e) => console.log(e),
              disabled: this.state.disabled,
              rules: [{ required: true, message: '请输入数字!' }],
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'select2',
              title: '树形下拉打发的发生的发的',
              type: DATA_ENTRY.TREESELECT,
              dataSource: this.state.selInit2,
              loading: this.state.loading,
              isMultiple: true,
              allowClear: true,
              onChange: (e) => console.log(e),
              disabled: this.state.disabled,
              rules: [{ required: true, message: '请输入数字!' }],
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              selectIndex: 'complextdate1',
              startIndex: 'begin1',
              endIndex: 'end1',
              title: '日期区间--',
              type: DATA_ENTRY.COMPLEXDATE,
              initialValue: this.state.comDate,
              hasDataBD: this.state.hasDataBD,
              hasDataED: this.state.hasDataED,
              selOnChange: this.selOnChange,
              startOnChange: (e) => console.log(e),
              endOnChange: (e) => console.log(e),
              onRef: (ref) => (this.COMPLEXDATE = ref),
              self: this.COMPLEXDATE,
              disabled: this.state.disabled,
              rules: [{ required: true, message: '请输入数字!' }],
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'date1',
              title: '时间选择1打发大水发的说法第三方',
              type: DATA_ENTRY.SINGLEDATE,
              disableBegin: moment('2020-10-10'),
              disableEnd: moment('2020-11-05'),
              initialValue: moment('2020-11-01'),
              onChange: (e) => console.log(e),
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: ['endDate', 'beginDate'],
              title: '日期区间打发的发送到发送到发为金融网',
              type: DATA_ENTRY.RANGEDATE,
              initialValue: [moment().subtract(1, 'year'), moment().subtract(5, 'day')],
              hasDataED: moment().subtract(1, 'day'),
              onRef: (ref) => {
                this.RANGEDATE = ref;
              },
              self: this.RANGEDATE,
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'portfolioId',
              type: DATA_ENTRY.PRODUCTGROUP,
              title: 'PRODUCTGROUP',
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'series8',
              type: DATA_ENTRY.SERIESPRODUCTS,
              title: 'SERIESPRODUCTS',
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'counterpartyid',
              title: '交易对手',
              type: DATA_ENTRY.TRADINGCOMPANY,
              dataType: 2,
              allowClear: true,
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'search_EQ_direction',
              title: '交易方向',
              businessType: -1,
              type: DATA_ENTRY.TRADINGDIRECT,
              appType: '1',
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'search_test_direction',
              title: '交易类型',
              type: DATA_ENTRY.TRADINGTYPE,
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'tenant',
              type: DATA_ENTRY.TENANT,
              title: 'TENANT',
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'tenantDepartment',
              type: DATA_ENTRY.TENANTDEPARTMENT,
              title: 'TENANTDEPARTMENT',
              span: '24',
              spanCol: '8',
            },
            {
              dataIndex: 'rateRange',
              title: '评级区间',
              type: DATA_ENTRY.RATERANGEC,
              dataRange: ['AA+', 'BB'],
              span: '24',
              styleRow: { width: '30%' },
            },
            {
              dataIndex: 'industry',
              title: '所属行业',
              type: DATA_ENTRY.INDUSTRYC,
              multiple: true,
              span: '24',
              styleRow: { width: '30%' },
            },
          ]}
          autoLayout={false}
          style={{ backgroundColor: '#FAFBFC', paddingTop: '15px', paddingBottom: '12px' }}
        />
      </div>
    );
  }
}

{
  /* <UploadC
accept='.docx'
value={this.state.fileList}
fileListLoading={!this.state.fileList?.length > 0}
type={1}
showUploadList={true}
onUpload={(e) => { console.log(e, '222') }}
/> */
}

export default FormGroupDemo;
